//
//  HMNavigationController.m
//  UI进阶-21-网易彩票
//
//  Created by 柯平常 on 16/4/3.
//  Copyright © 2016年 柯平常. All rights reserved.
//

#import "HMNavigationController.h"

@interface HMNavigationController ()

@end

@implementation HMNavigationController



//
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    
    if (self.childViewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    } else {
        viewController.hidesBottomBarWhenPushed = NO;
    }
    //设置backItem
    UIBarButtonItem *barItem = [[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
    self.topViewController.navigationItem.backBarButtonItem = barItem;
    
    [super pushViewController:viewController animated:animated];
}

@end
